<template>
  <div class="last">
    <ul class="last_content">
      <li
        v-for="item in setArr"
        :key="item.id"
        @click="$router.push(`/mydetail/${item.goodsId}`)"
      >
        <img :src="item.goodsLogo" alt="" />
        <p>{{ item.goodsName }}</p>
        <span class="one"
          ><del>{{ item.goodsOldPrice }}</del></span
        >
        <span class="two">{{ item.goodsPrice }}</span>
        <span class="three"
          ><img class="im1" src="../../assets/images/collect.png" alt="" /><i>{{
            item.goodsFav
          }}</i></span
        >
      </li>
    </ul>
  </div>
</template>
<script>
import { GethomeApi } from "@/request/api";
export default {
  data() {
    return {
      setArr: [],
    };
  },
  created() {
    GethomeApi({ page: 1, sortType: "new" }).then((res) => {
      console.log(res);
      this.setArr = res.data.data;
      console.log(this.setArr);
    });
  },
};
</script>
 
<style lang="less" scoped>
html,
body {
  overflow-x: hidden;
}
.last {
  width: 100vw;
  .last_content {
    margin-bottom: 15vw;
    display: flex;
    justify-content: space-around;
    flex-flow: wrap;
    padding: 0.4vw;
    background-color: #f7f8fa;
    li {
      //   flex: 1;
      background-color: #fff;
      width: 48%;
      flex-flow: wrap;
      min-width: 0;
      margin-bottom: 10px;
      transition: all 2s;
      img {
        width: 48vw;
        border-radius: 1.2vw;
        // margin-top: 10px;
        // width: 206px;
        // height: 206px;
      }
      p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-bottom: 0.08vw;
        font-size: 1.6vw;
        color: #000;
        line-height:20px ;
      }
      .one {
        margin-right: 2.666667vw;
        color: #dcdcdc;
        font-size: 1.6vw;
        display: inline-block;
      }
      .two {
        color: red;
        font-size: 1.6vw;
        margin-right: 2.666667vw;
      }
      .im1 {
        width: 3vw;
        height: 3vw;
     
        margin-right: 1vw;
      }
      i {
        font-size: 1.6vw;
      }
      .three {
        margin-bottom: 10px;
        float:right;
      }
    }
  }
}
</style>